﻿@model CRMExam.Models.MeetingViewModel

@{
    ViewBag.Title = "Add Meeting";
}

<h2>Add Activity</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        @Html.ValidationSummary(true)


        <div class="form-group">
            @Html.LabelFor(model => model.IsTask, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div>
                    <div id="radioButtonMeeting">
                        @Html.RadioButtonFor(model => model.IsTask, "False", Model.IsTask == false ? new { Checked = "checked" } : null)
                        @Html.Label("Meeting")
                       
                    </div>

                </div>
                <div id="radioButtonTask">
                    @Html.RadioButtonFor(model => model.IsTask, "True", Model.IsTask == true ? new { Checked = "checked" } : null)
                    @Html.Label("Task")
                </div>
                @Html.ValidationMessageFor(model => model.IsTask)
            </div>
        </div>

        <div id="usersContacts">
            <div class="form-group">
                @Html.Label("Users", new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownListFor(model => model.Receivers, Model.Receivers)
                    <input type="button" id="addReceiver" name="addReceiver" value="Add" />
                </div>
                <div class="col-md-10">
                    <select id="SelectedReceivers" multiple="multiple" name="SelectedReceivers"></select>
                    <input type="button" id="deleteReceiver" name="deleteReceiver" value="Delete" />
                </div>
            </div>

            <div class="form-group">
                @Html.Label("Contacts", new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownListFor(model => model.Contacts, Model.Contacts)
                    <input type="button" id="addContact" name="addContact" value="Add" />
                </div>
                <div class="col-md-10">
                    <select id="SelectedContactList" multiple="multiple" name="SelectedContactList"></select>
                    <input type="button" id="deleteContact" name="deleteContact" value="Delete" />

                </div>
            </div>
        </div>



        @*@Html.ListBoxFor(list => list.SelectedReceivers, Model.SelectedReceivers)*@
        
        <br />
       

        <div class="form-group">
            @Html.LabelFor(model => model.Selected, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Selected)
                @Html.ValidationMessageFor(model => model.Selected)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.SelectedContacts, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.SelectedContacts)
                @Html.ValidationMessageFor(model => model.SelectedContacts)
            </div>
        </div>
        

        @*<div class="form-group">
           
            <div class="col-md-10">
                @Html.DropDownListFor(model => model.Receivers, Model.Receivers)
                <input type="button" id="addReceiver" name="addReceiver" value="Add" />
                @Html.DropDownListFor(model => model.Contacts, Model.Contacts)
            </div>
        </div>*@

        @*<div class="form-group">
                @Html.LabelFor(model => model.AspNetUsersReciverId, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.AspNetUsersReciverId)
                    @Html.ValidationMessageFor(model => model.AspNetUsersReciverId)
                </div>
            </div>*@

        <div class="form-group">
            @Html.LabelFor(model => model.ContactId, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ContactId)
                @Html.ValidationMessageFor(model => model.ContactId)
            </div>
        </div>



        <div class="form-group">
            @Html.LabelFor(model => model.StartTime, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.StartTime)
                @Html.ValidationMessageFor(model => model.StartTime)
                @*</div>*@
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.EndTime, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.EndTime)
                @Html.ValidationMessageFor(model => model.EndTime)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Subject, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Subject)
                @Html.ValidationMessageFor(model => model.Subject)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Location, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Location)
                @Html.ValidationMessageFor(model => model.Location)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Created, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Created)
                @Html.ValidationMessageFor(model => model.Created)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Status, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Status)
                @Html.ValidationMessageFor(model => model.Status)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Priority, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Priority)
                @Html.ValidationMessageFor(model => model.Priority)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div class="link-color">
    @Html.ActionLink("Back to Activities", "Activities", "Calendar")
</div>
